package atm;

public class Ball {

 
	// Private variables
	private double x, y; // x and y location
	// Constructors
	public Ball(double x, double y) {
	this.x = x;
	this.y = y;
	}
	public Ball() {
	x = 0.0;
	y = 0.0;
	}
	// Public getters and setters for private variables x and y
	public double getX() {
	return x;
	}
	public void setX(double x) {
	this.x = x;
	}
	public double getY() {
	return y;
	}
	public void setY(double y) {
	this.y = y;
	}
	public void setXY(double x, double y) {
	this.x = x;
	this.y = y;
	}
	public void move(double xDisp, double yDisp) {
	x += xDisp;
	y += yDisp;
	}
	public String toString() {
	return "Ball @ (" + x + "," + y + ")";
	}
	}

